package cn.kuang.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author 徽州大都督
 * @date 2020/7/23
 */
@TableName(value = "user_message")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Msg {

    @TableId("msg_id")
    private String msgId;

    private String msgContent;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date msgTime;

    @TableField(exist = false)
    private User user;

    @TableField(exist = false)
    private Long total;

}
